﻿<template>
    <elm-page-tb>
        <template #top>
            <el-input placeholder="请查询输入内容" prefix-icon='el-icon-search' size="mini" style="width: 250px;" v-model="postData.name" clearable></el-input>
            <right>
                <el-button-group>
                    <el-button icon="el-icon-search" size="mini" @click="tablebinding()">查询</el-button>
                    <elm-open-button url="role_edit" title="新增" width="700" height="420" icon="el-icon-edit">新增</elm-open-button>
                </el-button-group>
            </right>
        </template>
        <elm-table url="/system/role/GetData" :post-data="postData">
            <el-table-column prop="name" label="角色名称" width="250px" align="center"></el-table-column>
            <el-table-column prop="type" label="类别"  width="200px" align="center"></el-table-column>
            <el-table-column prop="remark" label="备注" align="left" header-align="center"></el-table-column>
            <el-table-column fixed="right" label="操作" width="180px" align="center">
                <template v-slot="scope">
                    <elm-open-button url="role_edit" title="编辑" width="700" height="420"  v-if="scope.row.type=='自定义'" :data="{ model: scope.row }" type="text">编辑</elm-open-button>
                    <elm-open-button url="role_menu" title="分配模块" width="700" height="620" :data="{id: scope.row.id}" type="text">{{scope.row.id=='1'?"查看已":""}}分配模块</elm-open-button>
                    <elm-delete-button type="text" size="mini" url="/system/role/Delete" v-if="scope.row.type=='自定义'" :data="{ id: scope.row.id }">删除</elm-delete-button>
                </template>
            </el-table-column>
        </elm-table>
    </elm-page-tb>
</template>

<script>
    export default {
        extends: elmVueBase,
        data() {
            return {
                postData: { name: null },
            }
        },
        async created() {
        },
        methods: {
        }
    }
</script>

<style scoped>
</style>